{extend name="layout:base" /}{block name="content"}
 <?php
$global = 0;
if($LoginUserInfo['Group']['id']==1)
{
$global = 1;
}
 ?>
 <style>
.table th{text-align:center;}
</style>
<section class="topBanners">
         <div class="icon"></div>
         <div class="topBannersNav">
         <span data-url="/admin/feedback/myzx" onclick="ContentLoadGo('/admin/feedback/myzx')">用户留言</span>
         </div>
      </section>
   
      <section style="margin-top:10px;margin-left:auto;margin-right:auto;">
     
     
     
      <input type="hidden" value="搜索" class="group_btn research" id="resource" page="1" />
  
      <br style="clear:both;width:0px;height:0px;">
     </section>
 
       
   
<table class="table" style="margin-top:10px;">

<tr>

<th style="width:100px;">留言时间</th>

<th style="width:100px;">留言人姓名</th>
<th style="width:100px;">电话</th>
<th style="width:150px;">内容</th>

<th style="width:50px;">状态</th>
<th style="width:150px;">操作</th>
</tr>

<?php 

foreach($lists['data'] as $key=>$val)
{
?>
<tr data-id="<?php echo $val['id']; ?>">

<td>
<?php echo $val['ctime']; ?>
</td>
<td><?php echo $val['name']; ?></td>
<td><?php echo $val['tel']; ?></td>
<td style="overflow:hidden;">
<div class="mypointer" data-toggle="tooltip"
        data-placement="bottom" title="<?php echo $val['conts']; ?>"><?php echo $val['conts']; ?></div>

</td>
<td>

<?php 
if($val['stats']==1)
{
echo '已处理';
}
else
{
echo  '未处理';
}
?>
</td>
<td style="text-align:right;">


<input type="button" power="30300" value="回复" class="link_btn reply"/>

<?php 
if(empty($val['stats']))
{
?>
<input type="button" power="30300" value="处理" class="link_btn deal"/>
<?php
}
?>
<input type="button" power="30300" value="详情" class="link_btn info"/>
<input type="button" power="30400" value="删除" class="link_btn del"/>
</td>
</tr>
      <?php
      }
	  ?>
</table>
{include file="../application/admin/view/layout/page_tpl_new.html" /}
      <script type="text/javascript">
      
      function myResearch(){
		   var url="/admin/feedback/myzx";
		   var ser_stats =$("#ser_stats").val();
	
		  
		 
		   var page=$("#cpage").val();
		   var param={
				   ser_stats:ser_stats,
				   page:page
		   };
		   ContentLoadGo(url,param);
	   }
     
      
           $(function(){
        	   //设置搜索栏
        	 $(".research").unbind().bind("click",function(){
        		   var page =$(this).attr("page");
        		   $("#cpage").val(page);
        		   myResearch();
        		   
        	   });
        	   
        	   $(".del").unbind().bind("click",function(){
        		   var that =this;
        		   var url="/admin/feedback/delData";
        		   var id=$(that).parent().parent().attr('data-id');
        		   var param={
        				   id:id
        		   };
        		   cofirmsss_tishi(1,'您确定要删除吗?',function(id){
        			 
        			   AjaxRequest(url,param,function(data){
            			   if(data.err==0)
            			   {
            				   SuccessTiShi("操作成功");
            				   
            				   $(that).parent().parent().remove();
            				   myResearch();
            			   }
            			   else
            			   {
            				   ErrTiShi("操作失败");
            			   }
            		   });
        			   
        		   });
        	   });
        	   
        	   
        	
        	   $(".deal").unbind().bind("click",function(){
        		   var that =this;
        		   var url="/admin/feedback/dealData";
        		   var id=$(that).parent().parent().attr('data-id');
        		   var param={
        				   id:id
        		   };
        		   cofirmsss_tishi(1,'您确定要执行该操作吗',function(id){
        			 
        			   AjaxRequest(url,param,function(data){
            			   if(data.err==0)
            			   {
            				   SuccessTiShi("操作成功");
            				   
            				   $(that).parent().parent().remove();
            				   myResearch();
            			   }
            			   else
            			   {
            				   ErrTiShi("操作失败");
            			   }
            		   });
        			   
        		   });
        	   });
        	   
        	   
        	   $(".info").unbind().bind("click",function(){
        		   var that =this;
        		   var url="/admin/feedback/infoData";
        		   var id=$(that).parent().parent().attr('data-id');
        		   var param={
        				   id:id
        		   };
        		   ContentLoadGo(url,param);
        			
        	   });
        	   
        	   $(".reply").unbind().bind("click",function(){
        		   var that =this;
        		   var url="/admin/feedback/reply";
        		   var pid=$(that).parent().parent().attr('data-id');
        		   var param={
        				   pid:pid
        		   };
        		   ContentLoadGo(url,param);
        			
        	   });
        	   
        	   //导航
     
               $(".topBannerItem").unbind().bind("click",function(){
         		   var attArr = $(this).attr();
             	   goToSelfLink(attArr);
             	   
         			
         	   });
         	 
  			   //全选
  		  $("#all").unbind().bind("click",function(){
			    	if(this.checked){   
			        	$(".checkBoxInput").attr("checked", true);  
			        	$(".checkBoxInput").prop("checked", true);  
			    	}else{   
						$(".checkBoxInput").attr("checked", false);
						$(".checkBoxInput").prop("checked", false);
			    	}   
			    	var se=getAllSelectItem();
			    	//console.log(se);
			 	}); 
  			   
  			   
  			
           });
           
	  </script>
	  	  <script>
$(function (){
    //$("[data-toggle='popover']").popover();
    $("[data-toggle='tooltip']").tooltip();
});


</script>
	  {/block}
   